<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>平台账户管理记录</title>
<link href="../tablecloth/tablecloth.css" rel="stylesheet" type="text/css" media="screen" />
<script type="../tablecloth/tablecloth.js"></script>
<script type="text/javascript" src="../Js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../Js/haidao.offcial.general.js"></script>
<script type="text/javascript" src="../Js/select.js"></script>
<script type="text/javascript" src="../Js/haidao.validate.js"></script>
<script src="../My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
$(function(){init();});
function init() {
	var page = parseInt(document.form1.currentPage.value);
	var pageCount = parseInt(document.form1.pageCount.value);
	var count=parseInt(document.form1.count.value);
	if (page == 1 && pageCount!=1) {
		document.form1.pre1.disabled = "disabled";
		return;
	}
	if (page == count && pageCount!=1) {
		document.form1.next1.disabled = "disabled";
		return;
	}
	if (pageCount == 1) {
		document.form1.pre1.disabled = "disabled";
		document.form1.next1.disabled = "disabled";
		document.form1.first1.disabled = "disabled";
		document.form1.end1.disabled = "disabled";
		return;
	}
} 

function first() {
	window.location.href = "<%=request.getContextPath()%>/account/accountRecord.do?currentPage=1" + getQueryData();
	
}

function next() {
	var page = parseInt(document.form1.currentPage.value);
	window.location.href = "<%=request.getContextPath()%>/account/accountRecord.do?currentPage=" + (page + 1) + getQueryData();
}

function pre() {
	var page = parseInt(document.form1.currentPage.value);
	window.location.href = "<%=request.getContextPath()%>/account/accountRecord.do?currentPage=" + (page - 1) + getQueryData();
}

function end() {
	var pageCount = parseInt(document.form1.pageCount.value);
	window.location.href = "<%=request.getContextPath()%>/account/accountRecord.do?currentPage=" + pageCount + getQueryData();
}

//拼接查询条件
function getQueryData(){
	var queryper="";
	return queryper;
}

</script>
</head>

<body>
	<div>
		<div class="view-product">
			<div class="message-manage">
				<div class="manage-record margin-lr">
				<input type="button" value="返回" onclick="javascript:window.history.back(-1);">
					<div class="offcial-table margin-top clearfix">
						<div class="tr-th clearfix">
						<form name="form1" method="get">
							<table width="100%" border="0">
								<thead>
									<tr>
										<th>业务类型</th>
										<th>操作账户</th>
										<th>金额</th>
										<th>转出账户</th>
										<th>转入账户</th>
										<th>操作时间</th>
										<th>操作人</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${list}" var="u">
										<tr style="white-space: nowrap;">
											<td>${u.valName}</td>
											
											<c:if test="${u.account!=1 && u.account!=2}">
											    <td></td>
											</c:if>
											<c:if test="${u.account==1}">
											    <td>平台放款账户</td>
											</c:if>
											<c:if test="${u.account==2}">
											    <td>平台收入账户</td>
											</c:if>
											
											<td>${u.payMoney}</td>
											
											<c:if test="${u.putAccount!=1 && u.putAccount!=2}">
											    <td></td>
											</c:if>
											<c:if test="${u.putAccount==1}">
											    <td>平台放款账户</td>
											</c:if>
											<c:if test="${u.putAccount==2}">
											    <td>平台收入账户</td>
											</c:if>
											
											<c:if test="${u.incomeAccount!=1 && u.incomeAccount!=2}">
											    <td></td>
											</c:if>
											<c:if test="${u.incomeAccount==1}">
											    <td>平台放款账户</td>
											</c:if>
											<c:if test="${u.incomeAccount==2}">
											    <td>平台收入账户</td>
											</c:if>
											
											<td>${u.time}%</td>
											<td>${u.operator}</td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
							<table><tbody><tr><td>
							    <input type="hidden" name="currentPage" value="${currentPage}" /> 
								<input type="hidden" name="pageCount" value="${pageCount}"/> 
								<input type="hidden" name="count" value="${count}"/>
								<input type="button" name="first1" value="首页" onclick="first()" class="button gray" /> 
								<input type="button" name="pre1" value="上一页" onclick="pre()" class="button green"/> 
								<input type="button" name="next1" value="下一页" onclick="next()" class="button blue"/> 
								<input type="button" name="end1" value="尾页" onclick="end()" class="button gray"/> 
								<font>第${currentPage}页, 共${pageCount}页,共${count}条数据</font>
							</td></tr></tbody></table>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>

</html>